<?php


namespace app\api\model;


use think\Model;

class UserModel extends Model
{
    protected $name = "talents_user";

    public function FirmProve()
    {
        return $this->belongsTo(FirmProve::class, 'user_id', 'id');
    }
    //工作经历
    public function workTime()
    {
        //忽略某些字段
        return $this->hasMany(Work::class, 'user_id')->hidden(['createtime', 'updatetime']);
    }
    //教育经历
    public function learnTime()
    {
        //忽略某些字段
        return $this->hasMany(LearnTime::class, 'user_id')->hidden(['createtime', 'updatetime', 'status']);
    }
}